﻿@model UserViewModel
@{
    ViewBag.Title = "Kelper - Login";
}
<script type="text/javascript" src="@Url.Content("~/Scripts/jquery.validate.min.js")"></script>
<script type="text/javascript" src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")"></script>

<h2>Login</h2>
@if (ViewBag.Target != null) {
    <p class="subtle">You need to login to access @ViewBag.Target.</p>
}

<p>Not registered? @Html.ActionLink("Register", "register").</p>

@using (Html.BeginForm())
{
    <div>@Html.ValidationSummary(true)</div>
    <table>
        <tr>
            <td>@Html.LabelFor(m => m.Username)@Html.ValidationMessageFor(m => m.Username)</td>
            <td>@Html.LabelFor(m => m.Password)@Html.ValidationMessageFor(m => m.Password)</td>
        </tr>
        <tr>
            <td>@Html.EditorFor(m => m.Username)</td>
            <td>@Html.EditorFor(m => m.Password)</td>
        </tr>
        <tr>
            <td><input type="submit" value="Login" /></td>
        </tr>
    </table>
}